package com.superb.system.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.superb.common.database.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 系统角色表
 * @Author: ajie
 * @CreateTime: 2024-5-15
 */
@Data
@TableName("system_role")
@Tag(name = "系统角色表")
@EqualsAndHashCode(callSuper=false)
public class SystemRole extends BaseEntity {

    @NotBlank(message = "角色名称不能为空")
    @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @NotBlank(message = "角色代码不能为空")
    @Schema(description = "角色代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String code;

    @Schema(title = "状态", description = "0启用；1禁用")
    private Integer status;

    @NotNull(message = "排序不能为空")
    @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer sort;

    @NotNull(message = "角色类型不能为空")
    @Schema(title = "角色类型", description = "0系统角色1部门角色", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer type;

}